package com.zhong.system.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.zhong.common.annotation.QueryField;
import com.zhong.common.core.domain.BaseEntity;
import com.zhong.common.core.enums.QueryCondition;
import com.zhong.common.xss.Xss;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 通知公告表 sys_notice
 *
 * @author zhongzc
 */
@Data
@TableName("sys_notice")
@Table(comment = "通知公告表", name = "sys_notice", isSimple = true)
public class SysNotice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 公告标题 */
    @Xss(message = "公告标题不能包含脚本字符")
    @NotBlank(message = "公告标题不能为空")
    @Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
    @QueryField(condition = QueryCondition.like)
    @Column(comment = "公告标题")
    private String noticeTitle;

    /** 公告类型（1通知 2公告） */
    @Column(comment = "公告类型（1通知 2公告）",type = MySqlTypeConstant.CHAR)
    private String noticeType;

    /** 公告内容 */
    @Column(comment = "公告内容")
    private String noticeContent;

    /** 公告状态（0正常 1关闭） */
    @Column(comment = "公告状态（0正常 1关闭）",type = MySqlTypeConstant.CHAR)
    private String status;
}
